#ifndef getMAXFIELDS

#ifndef FALSE
#define FALSE 0
#define TRUE !0
typedef unsigned char bool;
#endif

#ifndef USHORT
typedef unsigned short ushort;
#define USHORT ushort;
#endif

#define getMAXFIELDS 200
#define getMAXSTRLEN 1000 /* maximal length for string-fields */
#define getMAXNSTRLEN 50 /* maximal length for non-string-fields */
#define getMINDLEN 10 /* minimal field length for double-fields */

#define getFLAGNONEG 0x01
#define getFLAGFILL0 0x02

#define getUPDATE (-2)

#define getRLNORECS (-3)
#define getRLDENY (-4)

#define getENUMDELIM '\t'

typedef enum {getString, getInt, getLong, getDouble, getBool, getEnum}
		getFieldType;

typedef enum {getEnterFull, getEnterFields, getEnterTest} getEnterMode;


typedef struct getSField
	{
	getFieldType Type;
	void far *Val;
	int x, y, Len, Max;
	ushort Flags;
	bool (far *CheckFn)();
	char far *Names;
	} getField;

extern bool getEscAbort, getWrapUpDown;

extern void far getInit(int MaxX, char far *y, char far *n,
						int FieldBKCol, int FieldTCol,
						int CurBKCol, int CurTCol);

extern void far getClear(void);

extern bool far getDefineString(char far *s, int x, int y, int len,
								bool (far *CheckFn)(getField far *Field,
													int CurNr, int NewNr));

extern bool far getDefineInt(int far *i, int x, int y, int len, ushort Flags,
							 bool (*CheckFn)(getField far *Field,
											 int CurNr, int NewNr));

extern bool far getDefineLong(long far *i, int x, int y, int len,
							  ushort Flags,
							  bool (far *CheckFn)(getField far *Field,
												  int CurNr, int NewNr));

extern bool far getDefineDouble(double far *d, int x, int y, int len,
								ushort Flags,
								bool (far *CheckFn)(getField far *Field,
													int CurNr, int NewNr));

extern bool far getDefineBool(bool far *b, int x, int y,
							  bool (far *CheckFn)(getField far *Field,
												  int CurNr, int NewNr));

extern bool far getDefineEnum(int far *i, int x, int y, char far *Names,
							  bool (far *CheckFn)(getField far *Field,
												  int CurNr, int NewNr));

extern void far getWriteField(int i);

extern int far getRead(int FirstField,
					   int (far *aAddKeyFn)(int FieldNr, getField far *Field,
											char far *Str, int Pos,int Key));

extern int far getCheckAll();

extern int far getReadList(void (far *InitScreen)(int FirstRec),
						   bool (far *EnterRec)(int Rec, int ScrOffs,
												getEnterMode Mode),
						   int (far *LeaveRec)(int Rec, int key),
						   int StartFirstRec, int StartRec, int StartField,
						   int (far *aAddKeyFn)(int FieldNr,
												getField far *Field,
												char far *Str,
												int Pos, int Key));

#endif

